package Theead;

/**
 * <p>
 * 扩展thread类创建线程
 * </p>
 * <p>
 * 重写run方法
 * </p>
 * 
 * @author HXZY
 *
 */

public class ThreadDemo extends Thread {

	public void run() {
		while (true) {
			System.out.println("我是线程" + Thread.currentThread(
					).getName());
			try {
				Thread.sleep(500);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

	}

}
